﻿// TODO: token MySubroutine as 'type_name' here ?
subroutine void MySubroutine();

subroutine(MySubroutine) void SubroutineA() {
    // 实现A
}
subroutine(MySubroutine) void SubroutineB() {
    // 实现B
}

uniform MySubroutine mySubroutineInstance;

void main() {
    // ... 其他代码
    mySubroutineInstance();
    // ... 其他代码
}